/* GUI CONVERTED from rcsinita.p (converter v1.75) Sat Aug 12 23:02:45 2000 */
/* rcsinita.p - Release Management Customer Schedules                   */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*V8:ConvertMode=Maintenance                                            */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                 */
/* REVISION: 8.6    LAST MODIFIED: 09/20/96           BY: TSI *K005*    */
/* REVISION: 8.6    LAST MODIFIED: 05/20/98           BY: *K1Q4* Alfred Tan */
/* REVISION: 8.6E   LAST MODIFIED: 01/01/2000         BY: *J3NH* Ashwini G  */
/* REVISION: 9.1    LAST MODIFIED: 08/12/00           BY: *N0KP* myb        */


         {mfdeclre.i}


         /* COPY SCHD_DET RECORDS FROM ONE SCHD_DET TO ANOTHER */

/*J3NH*/ /* REPLACE THE LOGIC OF COPYING THROUGH 'NULL' STREAM BY */
/*J3NH*/ /* BUFFER-COPY STATEMENT                                 */

         /*INPUT PARAMETERS*/
         define input parameter schddet_recid as recid no-undo.
         define input parameter prev_schd_rlse_id as character no-undo.

         /*BUFFERS*/
         define buffer prevrqm for rqm_det.

         /*STREAMS*/
/*J3NH** define stream nullout.              */

/*J3NH** {mfoutnul.i &stream_name=nullout}   */

         find schd_det
            where recid(schd_det) = schddet_recid
            no-lock.

         for each prevrqm
            where prevrqm.rqm_type       = schd_type
              and prevrqm.rqm_nbr        = schd_nbr
              and prevrqm.rqm_line       = schd_line
              and prevrqm.rqm_rlse_id    = prev_schd_rlse_id
              and prevrqm.rqm_date       = schd_date
              and prevrqm.rqm_time       = schd_time
              and prevrqm.rqm_interval   = schd_interval
              and prevrqm.rqm_reference  = schd_reference
         no-lock:

            find rqm_det
               where recid(rqm_det) = recid(prevrqm)
               no-lock.

/*J3NH** BEGIN DELETE **
 *               display stream nullout
 *               rqm_det.
 *           display stream nullout
 *               schd_rlse_id @ rqm_det.rqm_rlse_id.
 *            create rqm_det.
 *            assign rqm_det.
 *J3NH** END DELETE **/

/*J3NH*/    create rqm_det .
/*J3NH*/    buffer-copy prevrqm to rqm_det
/*J3NH*/    assign rqm_det.rqm_rlse_id = schd_rlse_id .
/*J3NH*/    if recid(rqm_det) = -1 then.

         end. /* FOR EACH PREVRQM */
